Skip to content

High-confidence a11y: fix footer contentinfo duplication and main navigation/menu semantics#5639

Merged
joeparsons merged 6 commits into
mainfrom
accessibility-fixes-high-confidence
Jun 30, 2026
Merged

High-confidence a11y: fix footer contentinfo duplication and main navigation/menu semantics#5639
joeparsons merged 6 commits into
mainfrom
accessibility-fixes-high-confidence

Conversation

@accesswatch

@accesswatch accesswatch commented May 28, 2026

Copy link
Copy Markdown
Contributor

Narrowly-scoped, high-confidence accessibility fixes in the az_barrio theme.

Changes

  1. Footer landmark. Remove the nested role="contentinfo" on the inner
    footer <div> in layout/page.html.twig. <footer class="site-footer"> is
    already an implicit contentinfo landmark, so the explicit role created a
    duplicate landmark. (This fix was applied earlier in the PR and then
    accidentally re-added in a later commit; it is now re-applied.)
  2. Primary navigation name. Add aria-label="Primary navigation" to the
    top <nav> so the navigation landmark is named.
  3. Main menu semantics. Convert the dropdown submenu from a bare
    <div class="dropdown-menu"> to a proper <ul>/<li> list, and collapse
    the now-redundant menu_level if/else around the closing </li> and
    </ul> (both branches were identical after the change).

Review

Addresses @djcelaya and @joshuasosa: the title/description now match the diff,
the accidentally-reverted footer fix is back, and the redundant menu
conditionals are removed.

@accesswatch accesswatch requested a review from a team as a code owner May 28, 2026 01:08
Copilot AI review requested due to automatic review settings May 28, 2026 01:08
@accesswatch accesswatch requested a review from a team as a code owner May 28, 2026 01:08

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR makes a narrowly scoped accessibility fix in the az_barrio page template by removing a duplicate nested contentinfo landmark while preserving the semantic outer footer landmark.

Changes:

  • Removed role="contentinfo" from the inner footer wrapper.
  • Kept <footer class="site-footer"> as the single contentinfo region.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

accesswatch and others added 3 commits May 27, 2026 19:34
Remove nested role=contentinfo inside footer wrapper to keep a single top-level contentinfo landmark and reduce repeated landmark violations.

Estimated impact from known scan: addresses landmark-contentinfo-is-top-level (100) and landmark-no-duplicate-contentinfo (99), roughly 199 findings (~40% of the prior 500).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Use semantic list markup for submenu containers in main navigation template and add explicit primary navigation landmark label in page layout.

This is a scoped, high-confidence accessibility fix pass to reduce list and landmark uniqueness violations without altering business logic.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Comment thread .github/workflows/ci.yml
Comment thread .github/workflows/ci.yml Outdated

@joeparsons joeparsons left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall these changes look good to me. We'll just want to revert the changes to the composer audit job in the CI workflow before merging.

@joeparsons joeparsons added bug Something isn't working user experience Improvements to user experience labels May 29, 2026
@joeparsons joeparsons added the patch release Issues to be included in the next patch release label May 29, 2026
@github-project-automation github-project-automation Bot moved this from Todo to Needs review in 3.3.7 bug-fix patch release May 29, 2026
@joeparsons joeparsons moved this from Needs review to In Progress in 3.3.7 bug-fix patch release May 29, 2026
@joeparsons joeparsons moved this from Needs review to In Progress in 3.4.2 bug-fix patch release May 29, 2026
@joeparsons joeparsons self-requested a review June 5, 2026 15:17
@joeparsons joeparsons moved this from In Progress to Needs review in 3.4.2 bug-fix patch release Jun 5, 2026
@joeparsons joeparsons dismissed their stale review June 5, 2026 15:20

Changes made.

{% if menu_level == 0 %}
</li>
{% else %}
</li>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If both if/else cases result in <li>, if-else isn't needed here.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. I'm wondering if the conditional </ul> following this is also now not needed.

@joshuasosa joshuasosa Jun 15, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a little confused; the PR description says:

Removed nested role="contentinfo" inside footer wrapper.

But it still appears here with no change.

Looking at main's version of page.html.twig doesn't seem to show a duplicate role="contentinfo". Does that mean this PR's description and title is outdated?

From what I can tell, the changes here are unrelated to the footer landmark. If that's the case, I'd suggest updating the title and description to more accurately reflect the changes within (i.e., remove references to footer landmark changes since there are none here).

Comment thread themes/custom/az_barrio/templates/layout/page.html.twig Outdated
Comment thread themes/custom/az_barrio/templates/navigation/menu--main.html.twig Outdated
Comment thread themes/custom/az_barrio/templates/navigation/menu--main.html.twig Outdated
Comment thread themes/custom/az_barrio/templates/navigation/menu--main.html.twig Outdated
{% if menu_level == 0 %}
</li>
{% else %}
</li>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. I'm wondering if the conditional </ul> following this is also now not needed.

Addresses review feedback (@djcelaya, @joshuasosa):
- Remove the nested role="contentinfo" on the inner footer div. It was applied
  earlier in this PR, then accidentally re-added in a later commit; <footer
  class="site-footer"> is the single contentinfo landmark again.
- Collapse the redundant menu_level if/else around the closing </li> and </ul>
  in menu--main.html.twig — both branches were identical after the dropdown
  <div> -> <ul> change.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@accesswatch accesswatch changed the title Fix duplicate footer contentinfo landmark (high-confidence a11y) High-confidence a11y: fix footer contentinfo duplication and main navigation/menu semantics Jun 22, 2026
@accesswatch

Copy link
Copy Markdown
Contributor Author

Addressed the feedback in 441d0aa:

  • Re-applied the footer role="contentinfo" removal on page.html.twig (it had been applied then accidentally re-added in a later commit) — thanks @djcelaya for spotting the revert.
  • Collapsed the redundant menu_level if/else around the closing </li> and </ul> in menu--main.html.twig (both branches were identical after the <div><ul> change) — per @joshuasosa.
  • Updated the title and description to match the actual changes.

Re-requesting review. 🙏

@accesswatch

Copy link
Copy Markdown
Contributor Author

@djcelaya this is ready for another look. All of your suggestions are in (441d0aa): the footer role="contentinfo" is removed on page.html.twig, and the redundant menu_level if/else around the closing </li> and </ul> in menu--main.html.twig are collapsed. I also updated the title and description to match the actual changes. If it looks good, could you please approve as edited so we can get it merged? Thanks for the careful review! 🙏

@github-project-automation github-project-automation Bot moved this from Needs review to Ready to merge in 3.4.4 bug-fix patch release Jun 24, 2026
@joeparsons joeparsons merged commit 304ef8f into main Jun 30, 2026
40 of 64 checks passed
@joeparsons joeparsons deleted the accessibility-fixes-high-confidence branch June 30, 2026 22:40
@github-project-automation github-project-automation Bot moved this from Ready to merge to Done in 3.4.4 bug-fix patch release Jun 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

accessibility bug Something isn't working patch release Issues to be included in the next patch release user experience Improvements to user experience

Projects

Development

Successfully merging this pull request may close these issues.

7 participants